function bg(obj,target1,target2){
    clearInterval(obj.timer1);
    clearInterval(obj.timer2);
        obj.timer1=setInterval(function(){
            if(obj.offsetLeft>target1){
            obj.style.left=obj.offsetLeft-1+'px';}
            else{
                clearInterval(obj.timer1);
            }
        },50);
        obj.timer2=setInterval(function(){
            if(obj.offsetLeft>target1){
            obj.style.left=obj.offsetLeft-1+'px';}
            else{
                clearInterval(obj.timer1);
            }
        },50);
}